Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the VMware Cursor Position extension on vncviewer #1212

Merged

Conversation

lhchavez
Copy link
Contributor

@lhchavez lhchavez commented Mar 2, 2021

This change makes it possible for re-synchronizing the remote cursor on
the vncviewer when in fullscreen mode. This is done by locally moving
the cursor position to what the server thinks it should be.

Now SDL games should work!

@lhchavez lhchavez force-pushed the vmware-cursor-position-vncviewer branch 3 times, most recently from c41d46e to af439d6 Compare March 2, 2021 14:12
Comment on lines 54 to 55
#include <CoreGraphics/CGGeometry.h>
#include <CoreGraphics/CGRemoteOperation.h>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CendioOssman did you get this working on macOS? or are there any further tweaks needed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still gettin fatal error: CoreGraphics/CoreGraphics.h: No such file or directory. So I would still suggest the top Carbon header.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do you do that? i don't have a way to test these changes, so i'm flying blind.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just change it to #include <Carbon/Carbon.h> :)

@@ -322,6 +332,25 @@ void DesktopWindow::setCursor(int width, int height,
}


void DesktopWindow::setCursorPos(const rfb::Point& pos)
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i take the mouse-grabbing comment back, this worked!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The grab check was fine and much welcome. My point was to also check focus. But then again, I guess grab implies focus so I guess that isn't needed...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! got it, i didn't quite grok the meaning of the other comment. Restored the grab check.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really restored the grab check.

@lhchavez lhchavez force-pushed the vmware-cursor-position-vncviewer branch from af439d6 to 5fe485e Compare March 2, 2021 14:34
@@ -51,6 +51,7 @@

#ifdef __APPLE__
#include "cocoa.h"
#include <CoreGraphics/CoreGraphics.h>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gave up trying to support individual headers and am now importing the whole thing. maybe this will alleviate the compile errors.

@CendioOssman
Copy link
Member

X11 seems to work fine at least. So it's Wayland and Windows that need more work.

@lhchavez
Copy link
Contributor Author

lhchavez commented Mar 2, 2021

X11 seems to work fine at least. So it's Wayland and Windows that need more work.

is there a way to check for wayland to disable it there? i'll also drop windows support since i also don't have a windows machine.

@CendioOssman
Copy link
Member

is there a way to check for wayland to disable it there? i'll also drop windows support since i also don't have a windows machine.

Having support for all our platforms is a requirement unfortunately, so we need to get these resolved. I'll see if I can dig a bit more this week.

@lhchavez
Copy link
Contributor Author

lhchavez commented Mar 2, 2021

is there a way to check for wayland to disable it there? i'll also drop windows support since i also don't have a windows machine.

Having support for all our platforms is a requirement unfortunately, so we need to get these resolved. I'll see if I can dig a bit more this week.

got it, thanks! re-enabled that bit of code in the meantime.

@CendioOssman
Copy link
Member

Hmm... Odd. I retested and it works just fine on Windows and Wayland now. Not sure what I did wrong before.

So please put the grab check back and this is okay to merge.

This change makes it possible for re-synchronizing the remote cursor on
the vncviewer when in fullscreen mode. This is done by locally moving
the cursor position to what the server thinks it should be.

Now SDL games should work!
@lhchavez lhchavez force-pushed the vmware-cursor-position-vncviewer branch from 7bdea1f to 51f10f7 Compare March 11, 2021 13:15
@CendioOssman CendioOssman merged commit 41bf43b into TigerVNC:master Mar 11, 2021
@lhchavez lhchavez deleted the vmware-cursor-position-vncviewer branch December 1, 2021 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants